package com.trhui.mallbook.client;

import com.trhui.mallbook.domain.common.ApiRequest;
import com.trhui.mallbook.domain.common.BaseResponse;
import com.trhui.mallbook.domain.request.yb.YbReceiptDownloadRequest;
import com.trhui.mallbook.domain.response.yb.YbReceiptDownloadResponse;
import com.trhui.mallbook.enums.ChannelTypeEnum;
import com.trhui.mallbook.enums.ServerCodeEnum;


/**
 * @description 回单下载接口
 */

public class ReceiptDownloadClient extends AbstractClient {

    /**
     * 回单下载
     *
     */
    public static BaseResponse<YbReceiptDownloadResponse> download(YbReceiptDownloadRequest request) {
        ApiRequest reqApiRequest = new ApiRequest.ApiRequestBuild()
                .merOrderId(request.getMerOrderId())
                .merchantNo(request.getMerchantNo())
                .params(request)
                .serverCode(ServerCodeEnum.RECEIPT_DOWNLOAD)
                .channelType(ChannelTypeEnum.YB)
                .build();
        return post(reqApiRequest, YbReceiptDownloadResponse.class);
    }



}
